import { AnswersID, AnswersTestID, PreWorkTemplatesID, TeacherID, WorkID } from '..';



export type Prepare = {
  /**作业ID	 */
  work_id: WorkID,
  /**教师ID */
  teacher_id: TeacherID,
  /**各试题答案解析	  */
  answers: Array<Answers>,
  /**备课信息 */
  pre_work: PreWork,
}
/**各试题答案解析	  */
export type Answers = {
  /** 小题次序ID*/
  id: AnswersID,
  /**子试题参考答案	 */
  tests: Array<{
    test_id: AnswersTestID,
    analytic: string,
    explanation: string,
    answer: Array<string>
  }>
}
/**备课信息 */
export type PreWork = {
  /**总评的称谓 */
  title: string,
  /**当前备课版本	 */
  version: string,
  /**分数区间模板	  */
  templates: Array<PreWorkTemplates>,
  /**各试题的备课信息	   */
  test_templates: Array<PreWorkTestTemplates>,
}
export type PreWorkTemplates = {
  id: PreWorkTemplatesID,
  name: string,
  /**总评内容	 */
  content: string,
  /**最大分值		 */
  max_score: number,
  /**最小分值		 */
  min_score: number,
  /**语音文本		 */
  audio_text: string,
  /**语音时长		 */
  audio_length: string,
  /**语音URL		 */
  audio_url: string,
  /**语音名称		 */
  audio_name: string,
}


export type PreWorkTestTemplates = {
  id: AnswersID,
  tests: Array<{
    test_id: AnswersTestID,
    /**备课音频	*/
    audios?: Array<{
      default: boolean,
      audio_length: number,
      audio_name: string,
      audio_url: string,
    }>,
    /**备课图片	 */
    images?: Array<{
      height: number,
      width: number,
      img_name: string,
      img_url: string,
    }>
  }>
}

export type ReqPrepareParam= {
  work_id: WorkID, 
}